<template>
  <div class="container-pt">
    <van-nav-bar left-arrow @click-left="$router.back()" fixed title="列表" />
    <van-tabs v-model="active" animated swipeable>
      <van-tab v-for="(item, index) in cateList" :key="index + 1">
        <template #title>
          <van-icon name="more-o" />
          {{ item.catename }}
        </template>
          <articlelistdbd :cateid="item.id"
          />
      </van-tab>
    </van-tabs>
  </div>
</template>

<script>
import { mapState } from "vuex";
import articlelistdbd from '../components/article-list-dbd'
export default {
  components:{articlelistdbd},
  data() {
    return {
      active: +this.$route.query.index,
    };
  },
  computed: {
    ...mapState('cate',["cateList"]),
  },
};
</script>

<style>
</style>